package com.example.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author fangyu
 * @version v1.0.0
 * @date 2020/7/20 7:21 下午
 */
@Controller
public class IndexController extends BaseController {

    @RequestMapping({"", "/", "index"})
    public String index(){
        // 1分页信息 2分类 3用户 4置顶 5精选 6排序
        IPage result = postService.paging(getPage(), null, null, null, null, "created");

        request.setAttribute("pageData", result);
        request.setAttribute("currentCategoryId", 0);
        return "index";
    }
}
